home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / fpc225_3.zip / F-PCHELP.ZIP / PASM.HLP < prev    next >
Text File  |  1988-06-14  |  6KB  |  123 lines

  1.                 Assembler documentation for PASM.SEQ
  2.  
  3.   Overview
  4.  
  5.           PASM.SEQ is an assembler which is based on an assembler
  6.         published in DDJ, February 1982 by Ray Duncan. That assembler
  7.         was subsequently modified by Robert L. Smith to repair bugs, and
  8.         support the Prefix assembler notation. I (Tom Zimmer) have made
  9.         additional modifications to allow switching syntaxes, and to
  10.         increase compatibility in POSTFIX mode with the F83 assembler.
  11.  
  12.  
  13.   PREFIX or POSTFIX ?
  14.  
  15.           PASM supports dual syntaxes. The words PREFIX and POSTFIX
  16.         switch between the two supported modes. The POSTFIX mode
  17.         is VERY similar to F83's CPU8086 assembler. PREFIX mode which is
  18.         the default mode, allows a syntax which is much closed to MASM.
  19.  
  20.  
  21.   Macros in PASM
  22.  
  23.           Another area of interest is macros, here is the definition of
  24.         the NEXT macro:
  25.  
  26.                 : NEXT  >PRE    JMP >NEXT A;    PRE> ;
  27.  
  28.           The macro itself is simply the sequence JMP >NEXT. The
  29.         surrounding words are used for support. Since PASM supports both
  30.         Sufix as well as Prefix notation, It is not know on entry to a
  31.         macro what mode is selected. The words >PRE and PRE> select
  32.         Prefix, and restore the previous mode so macros will always be
  33.         in Prefix notation. The A; after >NEXT, forces the assembly of
  34.         the JMP instruction before the mode switch.
  35.  
  36.  
  37.   Why Dual Syntax
  38.  
  39.           The assembler supports Prefix syntax, in an attempt to provide
  40.         a syntax which is more readable to programmers of other
  41.         languages. It supports Postfix syntax to prevent alienating the
  42.         established base of F83 users.
  43.  
  44.           The prefix notation is I think more readable, and certainly
  45.         will be more familiar to programmers of other languages. Please
  46.         consider writting any new assembly code you need in the Prefix
  47.         mode.
  48.  
  49.  
  50.   Syntax Comparison
  51.  
  52.  
  53.         PREFIX                  POSTFIX                 MASM
  54.  
  55.         AAA                     AAA                     AAA
  56.         ADC AX, SI              SI AX ADC               ADC AX,SI
  57.         ADC DX, 0 [SI]          0 [SI] DX ADC           ADC DX,0[SI]
  58.         ADC 2 [BX+SI], DI       DI 2 [BX+SI] ADC        ADC 2[BX][SI],DI
  59.         ADC MEM BX              BX MEM #) ADC           ADC MEM,BX
  60.         ADC AL, # 5             5 # AL ADC              ADC AL,5
  61.         AND AX, BX              BX AX AND               AND AX,BX
  62.         AND CX, MEM             CX MEM #) AND           AND CX,MEM
  63.         AND DL, # 3             3 # DL AND              AND DL,3
  64.         CALL NAME               NAME #) CALL            CALL NAME
  65.         CALL FAR [] NAME        FAR [] NAME #) CALL     ?????
  66.         CMP DX, BX              BX DX CMP               CMP DX,BX
  67.         CMP 2 [BP], SI          SI 2 [BP] CMP           CMP [BP+2],SI
  68.         DEC BP                  BP DEC                  DEC BP
  69.         DEC MEM                 MEM DEC                 DEC MEM
  70.         DEC 3 [SI]              3 [SI] DEC              DEC 3[SI]
  71.         DIV CL                  CL DIV                  DIV CL
  72.         DIV MEM                 MEM DIV                 DIV MEM
  73.         IN PORT# WORD           WORD PORT# IN           IN AX,PORT#
  74.         IN PORT#                PORT# IN                IN AL,PORT#
  75.         IN AX, DX               DX AX IN                IN AX,DX
  76.         INC MEM                 BYTE MEM INC            INC MEM BYTE
  77.         INC MEM WORD            MEM #) INC              INC MEM WORD
  78.         INT 16                  16 INT                  INT 16
  79.         JA NAME                 NAME JA                 JA NAME
  80.         JNBE NAME               NAME #) JNBE            JNBE NAME
  81.         JMP NAME                NAME #) JMP             JMP
  82.         LODSW                   AX LODS                 LODS WORD
  83.         LODSB                   AL LODS                 LODS BYTE
  84.         LOOP NAME               NAME #) LOOP            LOOP NAME
  85.         MOV AX, BX              BX AX MOV               MOV AX,BX
  86.         MOV AH, AL              AL AH MOV               MOV AH,AL
  87.         MOV BP, 0 [BX]          0 [BX] BP MOV           MOV BP,0[BX]
  88.         MOV ES: BP, SI          ES: BP SI MOV           MOV ES:BP,SI
  89.         MOVSW                   AX MOVS                 MOVS WORD
  90.         POP DX                  DX POP                  POP DX
  91.         POPF                    POPF                    POPF
  92.         PUSH SI                 SI PUSH                 PUSH SI
  93.         REP                     REP                     REP
  94.         RET                     RET                     RET
  95.         ROL AX, # 1             AX ROL                  ROL AX,1
  96.         ROL AX, CL              AX CL ROL               ROL AX,CL
  97.         SHL AX, # 1             AX SHL                  SHL AX,1
  98.         XCHG AX, BP             BP AX XCHG              XCHG AX,BP
  99.         XOR CX, DX              DX, CX XOR              XOR CX,DX
  100.  
  101.   Word Help documentation
  102.  
  103. CODE            ( | name --- )
  104.         Define "name" as a new code definition. Assembly language
  105.         follows, terminated by END-CODE.
  106.  
  107. END-CODE        ( --- )
  108.         Terminates CODE definitions.
  109.  
  110. INLINE          ( --- )
  111.         Starts an assembly language sequence in the middle of a : (colon)
  112.         definition. Assembly code instructions follow until the sequence
  113.         is terminated by END-INLINE. The sequence of assembly instructions
  114.         normally includes NEXT, 1PUSH, or 2PUSH just prior to the word
  115.         END-INLINE.
  116.  
  117. END-INLINE      ( --- )
  118.         Terminates a sequence of assembly instructions started with
  119.         INLINE in the middle of a : (colon) definition. Compilation of
  120.         the : (colon) definition resumes after END-INLINE is encountered
  121.  
  122.  
  123.